success_message = "Great Job! Click Submit Work."
success_image = (1, "green", "check")
success_points = 5
stage.set_background("underwater")
sprite = codesters.Sprite("applecore")
sprite.glide_to(-200, -200)
sprite = codesters.Sprite("sodacan")
sprite.glide_to(200, -200)
sprite = codesters.Sprite("fish")
sprite.set_speed(2)
sprite.move_down(150)
stage.wait(1)
sprite.say("Click on me!")
def click():
sprite.say("Don't litter!")
sprite.move_up(100)
sprite.turn_right(360)
sprite.move_down(100)
sprite.say("Save the oceans by saving me!")
sprite.set_x_speed(5)
sprite.event_click(click)
t = codesters.Teacher()
try:
params = t.find_block('def')
tval1 = params[0][1]
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success('click()' in tval1, "Great Job! Be sure to click on your sprite!")
t1.add_failure(tval1 == "DNE", "Did you add Sprite Click?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)